package com.taxi.action;

import java.util.List;

import com.taxi.bean.DistritoDTO;
import com.taxi.service.DistritoService;
import com.taxi.service.PaqueteBusinessDelegate;
import com.opensymphony.xwork2.ActionSupport;

public class DistritoAction extends ActionSupport {

private static final long serialVersionUID = 1L;
	
	private DistritoService service = PaqueteBusinessDelegate.getDistritoService();
	private boolean success;
	private List<DistritoDTO> lstDistrito;
	
	public String cargarDistritos(){
	
		try {
			lstDistrito = service.cargarDistrito();
			
			setSuccess(true);	
		} catch (Exception e) {
			setSuccess(false);
			
		}
		
	
		return SUCCESS;
		
	}

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public List<DistritoDTO> getLstDistrito() {
		return lstDistrito;
	}

	public void setLstDistrito(List<DistritoDTO> lstDistrito) {
		this.lstDistrito = lstDistrito;
	}
	
}
